Integrand size = 23, antiderivative size = 81 \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {b (a+b)}{4 a^3 f \left (b+a \cos ^2(e+f x)\right )^2}+\frac {a+2 b}{2 a^3 f \left (b+a \cos ^2(e+f x)\right )}+\frac {\log \left (b+a \cos ^2(e+f x)\right )}{2 a^3 f} \]
-1/4*b*(a+b)/a^3/f/(b+a*cos(f*x+e)^2)^2+1/2*(a+2*b)/a^3/f/(b+a*cos(f*x+e)^ 2)+1/2*ln(b+a*cos(f*x+e)^2)/a^3/f
Time = 1.12 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.62 \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {2 \left (a^2+3 a b+3 b^2\right )+(a+2 b)^2 \log (a+2 b+a \cos (2 (e+f x)))+a^2 \cos ^2(2 (e+f x)) \log (a+2 b+a \cos (2 (e+f x)))+2 a (a+2 b) \cos (2 (e+f x)) (1+\log (a+2 b+a \cos (2 (e+f x))))}{2 a^3 f (a+2 b+a \cos (2 (e+f x)))^2} \]
(2*(a^2 + 3*a*b + 3*b^2) + (a + 2*b)^2*Log[a + 2*b + a*Cos[2*(e + f*x)]] + a^2*Cos[2*(e + f*x)]^2*Log[a + 2*b + a*Cos[2*(e + f*x)]] + 2*a*(a + 2*b)* Cos[2*(e + f*x)]*(1 + Log[a + 2*b + a*Cos[2*(e + f*x)]]))/(2*a^3*f*(a + 2* b + a*Cos[2*(e + f*x)])^2)
Time = 0.29 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.93, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4626, 354, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (e+f x)^3}{\left (a+b \sec (e+f x)^2\right )^3}dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \frac {\cos ^3(e+f x) \left (1-\cos ^2(e+f x)\right )}{\left (a \cos ^2(e+f x)+b\right )^3}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle -\frac {\int \frac {\cos ^2(e+f x) \left (1-\cos ^2(e+f x)\right )}{\left (a \cos ^2(e+f x)+b\right )^3}d\cos ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 86 |
\(\displaystyle -\frac {\int \left (-\frac {b (a+b)}{a^2 \left (a \cos ^2(e+f x)+b\right )^3}-\frac {1}{a^2 \left (a \cos ^2(e+f x)+b\right )}+\frac {a+2 b}{a^2 \left (a \cos ^2(e+f x)+b\right )^2}\right )d\cos ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {b (a+b)}{2 a^3 \left (a \cos ^2(e+f x)+b\right )^2}-\frac {a+2 b}{a^3 \left (a \cos ^2(e+f x)+b\right )}-\frac {\log \left (a \cos ^2(e+f x)+b\right )}{a^3}}{2 f}\) |
-1/2*((b*(a + b))/(2*a^3*(b + a*Cos[e + f*x]^2)^2) - (a + 2*b)/(a^3*(b + a *Cos[e + f*x]^2)) - Log[b + a*Cos[e + f*x]^2]/a^3)/f
3.4.64.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Time = 11.32 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(\frac {-\frac {\left (a +b \right ) b}{4 a^{3} \left (b +a \cos \left (f x +e \right )^{2}\right )^{2}}-\frac {-a -2 b}{2 a^{3} \left (b +a \cos \left (f x +e \right )^{2}\right )}+\frac {\ln \left (b +a \cos \left (f x +e \right )^{2}\right )}{2 a^{3}}}{f}\) | \(73\) |
default | \(\frac {-\frac {\left (a +b \right ) b}{4 a^{3} \left (b +a \cos \left (f x +e \right )^{2}\right )^{2}}-\frac {-a -2 b}{2 a^{3} \left (b +a \cos \left (f x +e \right )^{2}\right )}+\frac {\ln \left (b +a \cos \left (f x +e \right )^{2}\right )}{2 a^{3}}}{f}\) | \(73\) |
risch | \(-\frac {i x}{a^{3}}-\frac {2 i e}{a^{3} f}+\frac {2 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+4 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+12 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+12 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+2 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+4 a b \,{\mathrm e}^{2 i \left (f x +e \right )}}{a^{3} f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )^{2}}+\frac {\ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +2 b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a}+1\right )}{2 a^{3} f}\) | \(199\) |
1/f*(-1/4*(a+b)*b/a^3/(b+a*cos(f*x+e)^2)^2-1/2*(-a-2*b)/a^3/(b+a*cos(f*x+e )^2)+1/2/a^3*ln(b+a*cos(f*x+e)^2))
Time = 0.27 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.37 \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\frac {2 \, {\left (a^{2} + 2 \, a b\right )} \cos \left (f x + e\right )^{2} + a b + 3 \, b^{2} + 2 \, {\left (a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right )}{4 \, {\left (a^{5} f \cos \left (f x + e\right )^{4} + 2 \, a^{4} b f \cos \left (f x + e\right )^{2} + a^{3} b^{2} f\right )}} \]
1/4*(2*(a^2 + 2*a*b)*cos(f*x + e)^2 + a*b + 3*b^2 + 2*(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2)*log(a*cos(f*x + e)^2 + b))/(a^5*f*cos(f*x + e)^4 + 2*a^4*b*f*cos(f*x + e)^2 + a^3*b^2*f)
Timed out. \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]
Time = 0.23 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.40 \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {2 \, {\left (a^{2} + 2 \, a b\right )} \sin \left (f x + e\right )^{2} - 2 \, a^{2} - 5 \, a b - 3 \, b^{2}}{a^{5} \sin \left (f x + e\right )^{4} + a^{5} + 2 \, a^{4} b + a^{3} b^{2} - 2 \, {\left (a^{5} + a^{4} b\right )} \sin \left (f x + e\right )^{2}} - \frac {2 \, \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{3}}}{4 \, f} \]
-1/4*((2*(a^2 + 2*a*b)*sin(f*x + e)^2 - 2*a^2 - 5*a*b - 3*b^2)/(a^5*sin(f* x + e)^4 + a^5 + 2*a^4*b + a^3*b^2 - 2*(a^5 + a^4*b)*sin(f*x + e)^2) - 2*l og(a*sin(f*x + e)^2 - a - b)/a^3)/f
Leaf count of result is larger than twice the leaf count of optimal. 656 vs. \(2 (75) = 150\).
Time = 0.96 (sec) , antiderivative size = 656, normalized size of antiderivative = 8.10 \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {3 \, a^{3} + 9 \, a^{2} b + 9 \, a b^{2} + 3 \, b^{3} + \frac {20 \, a^{3} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {28 \, a^{2} b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {4 \, a b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {12 \, b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {34 \, a^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {22 \, a^{2} b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {10 \, a b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {18 \, b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {20 \, a^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {28 \, a^{2} b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {4 \, a b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {12 \, b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, a^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {9 \, a^{2} b {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {9 \, a b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {3 \, b^{3} {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}}{{\left (a^{4} + a^{3} b\right )} {\left (a + b + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {2 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}^{2}} - \frac {2 \, \log \left (a + b + \frac {2 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {2 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{a^{3}} + \frac {4 \, \log \left ({\left | -\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1 \right |}\right )}{a^{3}}}{4 \, f} \]
-1/4*((3*a^3 + 9*a^2*b + 9*a*b^2 + 3*b^3 + 20*a^3*(cos(f*x + e) - 1)/(cos( f*x + e) + 1) + 28*a^2*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*a*b^2*( cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 12*b^3*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 34*a^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 22*a^2*b*(c os(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 10*a*b^2*(cos(f*x + e) - 1)^2/(c os(f*x + e) + 1)^2 + 18*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 20 *a^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 28*a^2*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 4*a*b^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1 )^3 - 12*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 3*a^3*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 9*a^2*b*(cos(f*x + e) - 1)^4/(cos(f*x + e ) + 1)^4 + 9*a*b^2*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 3*b^3*(cos( f*x + e) - 1)^4/(cos(f*x + e) + 1)^4)/((a^4 + a^3*b)*(a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(co s(f*x + e) + 1)^2)^2) - 2*log(a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2 /(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)/a^3 + 4*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/a^3)/f
Time = 19.47 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.89 \[ \int \frac {\tan ^3(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx=-\frac {\frac {a^2+3\,a\,b+2\,b^2}{4\,a^2\,b}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,a^2}}{f\,\left (2\,a\,b+a^2+b^2+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (2\,b^2+2\,a\,b\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^4\right )}-\frac {\mathrm {atanh}\left (\frac {4\,b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2}{8\,b^2+\frac {8\,b^3}{a}+4\,b^2\,{\mathrm {tan}\left (e+f\,x\right )}^2+\frac {8\,b^3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{a}}\right )}{a^3\,f} \]